#include "float4.h"

void ParallelButterflyDIF(float4* aR, float4* aI, float4* bR, float4* bI, const float4& rootsR, const float4& rootsI) {
  // Decimation-in-frequency butterfly is:
  // a = a + b
  // b = (a-b) * root

  float4 a_minus_bR = aR->sub(*bR);
  float4 a_minus_bI = aI->sub(*bI);

  *aR = aR->add(*bR);
  *aI = aI->add(*bI);

  *bR = a_minus_bR.msub(rootsR, a_minus_bI.mul(rootsI));
  *bI = a_minus_bI.msub(rootsR, a_minus_bR.mul(rootsI));
}

void main() {
  float4 a(1,2,3,4);
  float4 b(5,6,7,8);
  float4 c = a.add(b);

}
